Skip to content

install: a guided, coloured install that leaves codeaf ready to use - #1635

Merged
AbirAbbas merged 4 commits into
devfrom
feat/installer-welcome
Sep 28, 2026
Merged

AbirAbbas merged 4 commits into
devfrom
feat/installer-welcome

Conversation

@santoshkumarradha

Copy link
Copy Markdown
Member

What changes

The installer's output was a bare installed codeaf … line plus a raw export PATH=…, and the live main script still prints a three-line telemetry notice. This replaces it with:

  • Checked steps with a spinner while it resolves and downloads: Downloaded, Installed codeaf <tag> (split to fit 80 columns), PATH, Linked.
  • Zero-paste PATH: when ~/.local/bin, ~/bin or /usr/local/bin is on PATH and writable, it links the command there so codeaf works in the same terminal. A file there that is not its own link is never replaced; if another codeaf would still win on PATH, the paste line stays.
  • Get started guide: the PATH line (only when needed), cd your-project / codeaf, how to connect a model, handy commands, and links to agentfield.ai/docs/codeaf, playbooks, connections, Discord.
  • Start now: on a terminal it asks Start codeaf in <folder> now? [Y/n] (read from /dev/tty, not the piped script); Enter opens codeaf on its first-run connect screen. Skipped for pipes, CI, --verbose, --no-start / CODEAF_NO_START=1.
  • No telemetry text anywhere in the installer. Colour honours NO_COLOR and non-tty.

Bash 3.2 (macOS /bin/bash) compatible.

Proof

  • go test ./internal/release/ -run 'Install|H10|V1|V2|Pinned|Documented|Custom': ok (new TestInstallerLinksIntoAFolderAlreadyOnPath)
  • bash test/installer-telemetry.sh: 33 passed
  • go test ./internal/manual/ ./internal/namelaw/: ok
  • Real run against the live dev release under a pty: install → link → guide → Enter → first-run connect screen

🤖 Generated with Claude Code

https://claude.ai/code/session_01LzgNn3hAVmEVnHvXHLJ1E1

agentfield-bot and others added 4 commits September 27, 2026 20:42
The installer printed a bare version line and a PATH line. It now shows
checked steps with a spinner, links the command into a folder already on
PATH so it works in the same terminal, prints a short Get started guide
with agentfield.ai docs links, and offers to start codeaf right away.
Plain text for pipes, NO_COLOR, CI and --verbose; --no-start skips the
question.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LzgNn3hAVmEVnHvXHLJ1E1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LzgNn3hAVmEVnHvXHLJ1E1
…er services go through /connect

Four things from the review of #1635, three of them found against the
v0.4.1 binary that main ships:

- link_into_path replaced ANY symlink named codeaf in ~/.local/bin, ~/bin
  or /usr/local/bin, so a developer's source build linked there was
  silently swapped for the stable install, against the page's own promise.
  It now replaces a link only when it already lands on this install's file
  (`-ef`, a shell test, so the installer still needs no readlink); a link
  to anything else stays and the paste line is printed.
- `Start codeaf in ~ now? [Y/n]` defaulted to yes in the home folder, where
  a piped install usually runs, which opened codeaf over the whole home
  folder. The offer is skipped in the home folder, at / and in a deleted
  folder; the guide already says to cd into a project first.
- The guide said DeepSeek, Qwen, GLM and Kimi take a key and Ollama needs
  none right after "Connect a model when it asks", but the first-run
  screen offers only OpenRouter. It now says those go through /connect,
  which is true on v0.4.1 and on dev.

- The spinner sliced a string of braille frames one character at a time,
  which needs the named locale to be installed: with a UTF-8 LANG that ssh
  forwarded to a machine without it (bash 5 and bash 3.2 alike) every frame
  printed as a broken byte. The frames are an array now.

GUIDE also said NO_COLOR, CI and --verbose all meant plain text and no
question; NO_COLOR is plain text and still asks, CI and --verbose skip the
question. The sentence now says which is which.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@AbirAbbas
AbirAbbas merged commit 88d7e71 into dev Sep 28, 2026
4 checks passed
@AbirAbbas
AbirAbbas deleted the feat/installer-welcome branch September 28, 2026 14:53
AbirAbbas pushed a commit that referenced this pull request Sep 28, 2026
…1635)

The installer on main, on top of v0.4.1 and nothing else from dev: checked
steps with a spinner, a link into a folder already on PATH so codeaf works in
the same terminal, a Get started guide, and on a terminal the question
`Start codeaf in <folder> now? [Y/n]`, read from /dev/tty. The binary is
untouched; only the script, its tests and the pages that describe it move.

scripts/install.sh, test/installer-telemetry.sh and
internal/release/install_test.go are byte-identical to #1635's head, which
also carries the installer halves of two dev changes it was written on: the
installer prints no telemetry notice (#1511, with the matching
docs/TELEMETRY.md paragraph; v0.4.1 still prints the full notice itself
before any count is sent), and an install under another name puts that name
first in its receipt (#1519). docs/GUIDE.md and the two manual pages take
#1635's paragraphs in place of the ones that described the three-line notice.

It also carries the review fixes made on the pull request before it
landed: only the installer's own link on PATH is ever replaced, the start
question is not asked in the home folder or at /, the spinner's frames
survive a UTF-8 locale that is not installed, and the guide sends
DeepSeek, Qwen, GLM, Kimi and Ollama through /connect, since v0.4.1's first
run offers OpenRouter alone.

This commit is merged into staging and dev so main stays an ancestor of
staging and staging of dev, and every later promotion is still a
fast-forward.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
AbirAbbas added a commit that referenced this pull request Sep 28, 2026
Brings e446507 (the guided installer, on top of v0.4.1) into staging, so
main can fast-forward onto it and the rc it publishes passes the "already on
staging" check. Staging already carried #1511's half of that commit; the
conflicts in scripts/install.sh and test/installer-telemetry.sh resolve to
#1635's head, byte for byte.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
AbirAbbas added a commit that referenced this pull request Sep 28, 2026
#1635 reached dev as 88d7e71. The same change reached main as e446507,
on top of v0.4.1 and nothing else, and staging as the merge 80c23bc. This
merge changes no file; it makes 80c23bc an ancestor of dev, so the staging
build passes release.yml's "already on dev" check, the rc passes "already on
staging", and the next promotion of dev to staging and of staging to main is
still a fast-forward.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@AbirAbbas

Copy link
Copy Markdown
Collaborator

Reviewed and landed. On top of your three commits I pushed a6061a7 with four review fixes (the first three found against v0.4.1, which main ships):

  • ln -sf replaced any codeaf symlink in ~/.local/bin, ~/bin or /usr/local/bin (e.g. a source build linked there). Now only its own link is refreshed (-ef); a link to anything else stays and the paste line is printed.
  • Start codeaf in ~ now? [Y/n] defaulted to yes in the home folder, which is where a piped install usually runs. The question is now skipped in ~ and /.
  • The guide said DeepSeek/Qwen/GLM/Kimi/Ollama right after "Connect a model when it asks", but the first run offers only OpenRouter. It now points those at /connect.
  • The spinner sliced a string of braille frames by character. When LANG is a UTF-8 locale that isn't installed (typical after ssh), every frame printed as a broken byte. The frames are now an array.

Tested: the installer suite under bash 5 and a from-source bash 3.2, the release tests, and live tmux installs against the real v0.4.1 release (home folder, a foreign link, a clean project folder where Enter opens the first-run screen).

Where it landed:

curl -fsSL https://agentfield.ai/get/codeaf | bash serves the new script now. The stable binary it installs is still v0.4.1.

@santoshkumarradha santoshkumarradha added the area:build make targets, size budget, cross-build, release label Oct 3, 2026
@santoshkumarradha santoshkumarradha added this to the Tests & tooling milestone Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:build make targets, size budget, cross-build, release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants